package demo.using;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;


/**
 * @author : GuoFei
 * @date : 2019/1/30 16:40
 */
public class JSONParse<T> {

    public static <T> T JSON2JavaObj(Class<T> tClass,String val){
        JSONObject jsonObject = JSON.parseObject(val);
        return JSON.toJavaObject(jsonObject, tClass);
    }


}
